Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added: Longest Common Prefix Program #1847

Merged
merged 1 commit into from
Nov 10, 2024

Conversation

rajdeepchakraborty-rc
Copy link
Contributor

Issue Resolved

Algorithm Added

Longest Common Prefix

Description

This program finds the Longest Common Prefix (LCP) among an array of strings. The LCP is the longest sequence of characters shared at the beginning of all strings in the array. The program employs an efficient algorithm to identify the common prefix by comparing the strings character by character.

Example:
Enter the number of strings: 5
Enter the strings:
String 1: prawn
String 2: prajakta
String 3: prince
String 4: probably
String 5: project

Output:
The longest common prefix is: pr

Added the C code and the README file for the program
@rajdeepchakraborty-rc
Copy link
Contributor Author

@pankaj-bind Please review the PR at your convinience

@rajdeepchakraborty-rc
Copy link
Contributor Author

Also, after the recent PR, you merged:

The Contributor has again broken the codebase cloning due to improper directory path naming:
image

The space in the Folder name is failing the cloning process:

Screenshot 2024-11-10 021215

@pankaj-bind pankaj-bind merged commit 3030061 into AlgoGenesis:main Nov 10, 2024
1 of 2 checks passed
@rajdeepchakraborty-rc
Copy link
Contributor Author

@pankaj-bind please do assign the PR to me. I had opened an unmerged PR request as instructed by the Core team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[NEW ALGORITHM] Longest Common Prefix Under Strings
2 participants